package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Mobile string `gorm:"type:char(11);not null;comment:手机号"`
}

func (u *User) Create() error {
	return DB.Debug().Create(&u).Error
}
func (u *User) FindUser() error {
	return DB.Debug().Where("mobile = ?", u.Mobile).Limit(1).Find(&u).Error
}
